<template>
  <center>
    <div v-html="doc" style="text-align: left"></div>
  </center>
</template>

<script>
    export default {
     name: "info",
     data(){
       return{
         doc:''
       }

     },
    methods:{
      getParams(){
        // 取到路由带过来的参数
        const routerParams = this.$route.query.doc
        // 将数据放在当前组件的数据内
        this.doc = routerParams;
      }
    },
      created(){
        this.getParams()
      },
      watch: {
        '$route': 'getParams'
      }
    }
</script>

<style scoped>

</style>
